<?php

/**
 * Test form.
 *
 * @package    tests
 * @subpackage form
 * @author     Djul
 */
class TestForm extends BaseTestForm
{
  public function configure()
  {

     $c = new Criteria();
     if(!sfContext::getInstance()->getUser()->getGuardUser()->getIsSuperAdmin())
     {
        $c->addJoin(TestBlockPeer::SUBJECT_ID, UserSubjectPeer::SUBJECT_ID);
        $c->addJoin(UserSubjectPeer::USER_ID, sfContext::getInstance()->getUser()->getGuardUser()->getId());
     }
     
     $this->widgetSchema['test_block_id'] = new sfWidgetFormPropelChoice(array('model' => 'TestBlock', 'add_empty' => false, 'criteria' => $c));

  }
}
